--[[ 
.....

--]]



-- ARMOR -----------------------------------------------------------------
if minetest.get_modpath("3d_armor") then
	armor:register_armor("duckarmor:helmet_duck", {
		description = ("Duck Helmet"),
		inventory_image = "duckarmor_inv_helmet_duck.png",
		groups = {armor_head=1, armor_heal=16, armor_use=70,armor_water=1},
		armor_groups = {fleshy=17},
		damage_groups = {cracky=2, snappy=1, level=4},
    })


	armor:register_armor("duckarmor:leggings_duck", {
		description = ("Duck Leggings"),
		inventory_image = "duckarmor_inv_leggings_duck.png",
		groups = {armor_legs=1, armor_heal=16, armor_use=70},armor_water=1,
		armor_groups = {fleshy=22},
		damage_groups = {cracky=2, snappy=1, level=4},
		
		
		
		
	})

	armor:register_armor("duckarmor:chestplate_duck", {
		description = ("Duck Chestplate"),
		inventory_image = "duckarmor_inv_chestplate_duck.png",
		groups = {armor_torso=1, armor_heal=16, armor_use=70,armor_water=1},
		armor_groups = {fleshy=22},
		damage_groups = {cracky=2, snappy=1, level=4},
	})


		armor:register_armor("duckarmor:boots_duck", {
		description = ("Duck Boots"),
		inventory_image = "duckarmor_inv_boots_duck.png",
		groups = {armor_feet=1, armor_heal=16, armor_use=70, physics_speed=1.25,armor_water=1},
		armor_groups = {fleshy=17},
		damage_groups = {cracky=2, snappy=1, level=4},
	})

		armor:register_armor("duckarmor:shield_duck", {
			description = ("Duck Shield"),
			inventory_image = "duckarmor_shields_inv_shield_duck.png",
			groups = {armor_shield=1, armor_heal=12, armor_use=70,armor_water=1},
			armor_groups = {fleshy=15},
			damage_groups = {cracky=2, snappy=1, level=4},
	})
	
	
	
	------- BOTAS DE PENAS ( FEATHER )
	
		armor:register_armor("duckarmor:boots_feather", {
		description = ("Duck Boots"),
		inventory_image = "duckarmor_inv_boots_feather.png",
		groups = {armor_feet=1, armor_heal=0, armor_use=2000, flammable=1, physics_gravity=-0.7},
		armor_groups = {fleshy=5},
		damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1},
	})
	
      
      
      ---------- ASAS DE PATO HEHE' ( PARA CONSEGUIR AS ASSAS, VOCÊ PRECISA MATAR O BOSS " AINDA NÃO ADICIONADO" )
      
      armor:register_armor("duckarmor:chestplate_wings", {
		description = ("Duck Wings"),
		inventory_image = "duckarmor_inv_chestplate_wings.png",
		groups = {armor_legs=1, armor_heal=16, armor_use=70},armor_water=1,
		armor_groups = {fleshy=22},
		damage_groups = {cracky=2, snappy=1, level=4},
		
		-- A CAPACIDADE VOAR ( INSPIRADO NO MOD " FLYSWIM ")
		
		
		on_equip = function(player)
					local privs = minetest.get_player_privs(player:get_player_name())				
					privs.fly = true
					minetest.set_player_privs(player:get_player_name(), privs)
				  end,
				  
		on_unequip = function(player)
					local privs = minetest.get_player_privs(player:get_player_name())
					privs.fly = nil
					minetest.set_player_privs(player:get_player_name(), privs)
				  end,
		
		
		
	})
     
	

end


---- RECEITAS ( CRAFT ) ----------------------------------------------------------------------------------------

minetest.register_craft({
	output = "duckarmor:helmet_duck",
	recipe = {
		{"duckarmor:greem_feather", "3d_armor:helmet_diamond", "duckarmor:greem_feather"},
		{"default:coral_skeleton", "", "default:coral_skeleton"},
		{"", "", ""},
	}
})



minetest.register_craft({
	output = "duckarmor:leggings_duck",
	recipe = {
		{"mobs:chicken_feather", "3d_armor:leggings_diamond", "mobs:chicken_feather"},
		{"mobs:chicken_feather", "", "mobs:chicken_feather"},
		{"default:coral_skeleton", "", "default:coral_skeleton"},
	}
})


minetest.register_craft({
	output = "duckarmor:chestplate_duck",
	recipe = {
		{"mobs:chicken_feather", "", "mobs:chicken_feather"},
		{"mobs:chicken_feather", "3d_armor:chestplate_diamond", "mobs:chicken_feather"},
		{"default:coral_skeleton", "default:coral_skeleton", "default:coral_skeleton"},
	}
})


minetest.register_craft({
	output = "duckarmor:boots_duck",
	recipe = {
		{"duckarmor:orange_feather", "duckarmor:orange_feather", "duckarmor:orange_feather"},
		{"duckarmor:orange_feather", "3d_armor:boots_diamond", "duckarmor:orange_feather"},
		{"duckarmor:orange_feather", "duckarmor:orange_feather", "duckarmor:orange_feather"},
	}
})


minetest.register_craft({
	output = "duckarmor:shield_duck",
	recipe = {
		{"mobs:chicken_feather", "mobs:chicken_feather", "mobs:chicken_feather"},
		{"mobs:chicken_feather", "shields:shield_diamond", "default:coral_skeleton"},
		{"default:coral_skeleton", "default:coral_skeleton", "default:coral_skeleton"},
	}
})


---- BOTAS DE PENAS -----------------------------------------------------------------------------------------

minetest.register_craft({
	output = "duckarmor:boots_feather",
	recipe = {
		{"mobs:chicken_feather", "", "mobs:chicken_feather"},
		{"mobs:chicken_feather", "", "mobs:chicken_feather"},
		{"", "", ""},
	}
})






-------- Feathers ---------------------------------------------------------------------------


minetest.register_craftitem ( "duckarmor:greem_feather" , {
    description = "Greem Feather",
    inventory_image = "feather_greem.png",
    

})


minetest.register_craftitem ( "duckarmor:orange_feather" , {
    description = "Orange Feather",
    inventory_image = "feather_orange.png",
    

})


-- Receita :

minetest.register_craft({
	type = "shapeless",
	output = "duckarmor:orange_feather",
	recipe = {
		
		"dye:orange", 
		"mobs:chicken_feather",
		
	},
})

-- tabela de cores verdes :

minetest.register_craft({
	type = "shapeless",
	output = "duckarmor:greem_feather",
	recipe = {
		
		"dye:dark_green", 
		"mobs:chicken_feather",
		
	},
})


